<template>
  <div class="maxbox">
    <div class="top">
      <van-swipe :autoplay="3000" lazy-render>
        <van-swipe-item v-for="image in list" :key="image">
          <img :src="image.picUrl" />
        </van-swipe-item>
      </van-swipe>
      <div class="columon">
        <div>
          <img src="@/assets/imgs/cd.png" alt="" />
          <p>签到</p>
        </div>
        <div>
          <img src="@/assets/imgs/cup.png" alt="" />

          <p>礼券</p>
        </div>
        <div>
          <img src="@/assets/imgs/bargin.png" alt="" />
          <p>砍价</p>
        </div>
        <div>
          <img src="@/assets/imgs/special.png" alt="" />
          <p>专栏</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { reactive, toRefs } from "vue";
import { getBanner } from "@/api";
export default {
  setup() {
    return {
      ...toRefs(getBan()),
    };
  },
};
function getBan() {
  let bannerList = reactive({
    list: [],
  });
  getBanner().then((res) => {
    bannerList.list = res.data;
    console.log(bannerList.list);
  });
  return bannerList;
}
</script>

<style lang="scss" scoped>

.top {
  width: 100%;
  position: relative;
  img {
    width: 100%;
    height: 100%;
  }
}
.columon {
  width: 100%;
  height: 200px;
  background-color: #fff;
  position: absolute;
  bottom: 0;
  left: 0;
  border-radius: 20% 20% 0 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  div {
    width: 100px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    img {
      width: 85%;
      height: 55%;
    }
    p {
      font-size: 37px;
    }
  }
}
</style>
